<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="ThemeBucket">
    <title>排片管理</title>

    <link th:include="common::com_css">

</head>

<body class="sticky-header">
<section>
    <div th:replace="common :: #com_leftmenu"></div>
    <div class="main-content">
        <div th:replace="common :: #com_headermenu"></div>
        <div class="wrapper">
            <div class="col-sm-12">
                <div class="adv-table editable-table">
                    <section id="no-more-tables">
                        <div th:replace="common :: #com_alert"></div>
                        <table class="table table-bordered table-striped table-condensed cf" id="editable-sample">
                            <thead class="cf">
                            <tr>
                                <th style="text-align: center">排片id</th>
                                <th style="text-align: center">电影名称</th>
                                <th style="text-align: center">影厅名称</th>
                                <th style="text-align: center">播放时间</th>
                                <th style="text-align: center">票价</th>
                                <th style="text-align: center">座位状态</th>
                                <th style="text-align: center">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                                <tr th:each="r:${rowPieceList}" style="text-align: center">
                                    <td data-title="排片id">
                                        <span th:text="${r.id}"></span>
                                    </td>
                                    <td data-title="电影名称" style="text-align: center">
                                        <span th:text="${r.filmName}"></span>
                                    </td>
                                    <td data-title="影厅名称">
                                        <span th:text="${r.screensName}"></span>
                                    </td>
                                    <td data-title="播放时间">
                                        <span th:text="${r.playingTime}"></span>
                                    </td>
                                    <td data-title="票价">
                                        <span th:text="${r.fare}"></span>
                                    </td>
                                    <td data-title="座位状态">
                                        <span th:text="${r.sitState}"></span>
                                    </td>
                                    <td data-title="操作" style="text-align: center">
<!--                                        <a class="btn btn-sm btn-search p1" put_url="/ReadArticle/${a.id}/${a.title}" put_id="${a.id}">查看</a>-->
                                        <a class="btn btn-sm btn-warning s1" th:href="@{'/updateRowPiecePage?id='+${r.id}}">修改</a>
                                        <a class="btn btn-sm btn-danger d1" put_url="/deleteRowPiece" th:put_id="${r.id}">删除</a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <form id="delEmpRorm" method="post">
                            <input type="hidden" id="d_id" name="id">
                        </form>
                    </section>
                </div>
            </div>

        </div>
        <footer class="sticky-footer">
            2021 &copy; <a href="https://github.com/ZhangHeng0805" target="_blank">星曦向荣</a>
        </footer>
    </div>
</section>

<div th:include="common::#com_js"></div>
<script>
    jQuery(document).ready(function() {
        EditableTable.init();
    });
    $(".d1").click(function () {
        var d=window.confirm("确定删除此排片？");
        if(d) {
            $("#d_id").attr("value", $(this).attr("put_id"));
            $("#delEmpRorm").attr("action", $(this).attr("put_url")).submit();
            return false;
        }
    });
</script>
</body>
</html>